package com.example.qx.adapter;

import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentPagerAdapter;

import java.util.List;

public class adapter extends FragmentPagerAdapter {

   private List<Fragment> mFragment;

    public adapter( FragmentManager fm, List<Fragment> fragments) {
        super(fm);
    mFragment=fragments;
    }

    @Override
    public int getCount() {

        return mFragment.size();
    }

    @NonNull
    @Override
    public Fragment getItem(int i) {
        return mFragment.get(i);
    }
}
